package com.heima.wemedia.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heima.model.wemedia.pojos.WmNewsMaterial;
import com.heima.wemedia.mapper.WmNewsMaterialMapper;
import com.heima.wemedia.service.WmNewsMaterialService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author DiXiaoNie
 * @since 2022/12/21 17:45
 */
@Service
public class WmNewsMaterialServiceImpl extends ServiceImpl<WmNewsMaterialMapper, WmNewsMaterial> implements WmNewsMaterialService {
    @Resource
    private WmNewsMaterialMapper wmNewsMaterialMapper;

    /**
     * 保存关系
     *
     * @param materialIds 材料标识
     * @param newsId      消息id
     * @param type        类型
     * @author DiXiaoNie
     * @date 2022/12/21
     */
    @Override
    public void saveRelations(List<Integer> materialIds, Integer newsId, Short type) {
        this.wmNewsMaterialMapper.saveRelations(materialIds, newsId, type);

    }
}
